On-chip security method and apparatus

ABSTRACT

A boot method an apparatus are described which reduce the likelihood of a security breach in a mobile device, preferably in a situation where a reset has been initiated. A predetermined security value, or password, is stored, for example in BootROM. A value of a security location within FLASH memory is read and the two values are compared. Polling of the serial port is selectively performed, depending on the result of such comparison. In a presently preferred embodiment, if the value in the security location matches the predetermined security value, then polling of the serial port is not performed. This reduces potential security breaches caused in conventional arrangements where code may be downloaded from the serial port and executed, which allows anyone to access and upload programs and data in the FLASH memory, including confidential and proprietary information.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.12/113,321 filed May 1, 2008, which is a continuation of U.S. patentapplication Ser. No. 10/500,131 filed Jun. 25, 2004, which is a nationalapplication of International Application No. PCT/CA02/01947 filed Dec.13, 2002, which claimed the benefit of priority from U.S. PatentApplication No. 60/342,082 filed Dec. 26, 2001.

FIELD OF THE INVENTION

The present invention relates to the field of application-specificintegrated circuits (ASICs) and on-chip BootROM (Boot Read-Only Memory).In particular, the present invention relates to the field ofincorporating security features into on-chip BootROM, preferably for usein a mobile device.

BACKGROUND OF THE INVENTION

Many mobile devices, such as cellular telephones, personal digitalassistants (PDAs), and other handheld computing and communicatingdevices, currently perform numerous and complex functions. Such a mobiledevice may occasionally require resetting of at least a portion of thesoftware used thereon to a known prior state in order to avoid currentor potential problems. Typically, a mobile device comprises a resetswitch, or other equivalent means known in the art, which a user canactuate in order to initiate a reset process.

It has been observed that some existing ASIC processors for mobiledevices may be breached through their serial port line after a resetprocess has been initiated. An external reset switch typically controlsa reset circuit in the mobile device. When the reset switch is actuated,the reset circuit closes, sending a signal, or reset command, to theASIC to reset. When the reset switch is released and the reset circuitopens, instructions stored in internal BootROM are executed and theBootROM instructs the ASIC to poll a serial port, which can be connectedto a personal computer, for activity.

If there is serial port activity, this usually indicates that there isnew code to be downloaded. This new code may be stored in memory on apersonal computer, or may be transmitted via the personal computer fromanother source and may comprise, for example, a new version of code tobe executed in the mobile device. Typically, program code in the BootROMwill jump to a routine for downloading the new code via the serial portinto internal SRAM. Once downloading is complete, the program code inBootROM will jump to the beginning of the downloaded new code and beginto execute the downloaded new code. This downloaded new code typicallyhas complete access to other components in the mobile device, such asFLASH memory, in terms of instructions and commands that are permitted.This constitutes a potential security risk, since it can allow anyone toprovide new code at the serial port that, once executed, can access andupload programs and data stored in the mobile device's FLASH memory,including confidential and proprietary information. Such access wouldconstitute a security breach.

It is therefore desirable to provide a security feature in order toreduce the likelihood of occurrence of such a breach.

SUMMARY OF THE INVENTION

It is an object of the present invention to obviate or mitigate at leastone disadvantage of previous memory and processor arrangements,particularly those provided for use with handheld or mobile devices.

A boot method used by an ASIC and memory in a mobile device isdescribed, as well as an apparatus for use in such mobile device. Asecurity feature is provided according to an embodiment of the inventionthat reduces the likelihood of a security breach, preferably in asituation where a reset of the mobile device has been initiated. Thesecurity feature comprises selective polling of the serial port based onthe result of a comparison between a value stored on an ASIC, such as inBootROM, and a value stored in FLASH memory.

A predetermined security value, or password, is stored in a circuit inthe mobile device, for example in BootROM. Program code in the BootROMis preferably modified so that a security location within the mobiledevice's FLASH memory is read prior to polling the serial port foractivity. If the value in the security location matches thepredetermined security value, then polling of the serial port is notperformed. This reduces potential security breaches caused inconventional arrangements where code may be downloaded from the serialport and executed, which allows anyone to access and upload programs anddata in the FLASH memory, including confidential and proprietaryinformation.

In one aspect of the invention, a predefined memory location, e.g. asecurity location, in the FLASH memory contains a password, or similarsecurity value. Immediately after a device reset, boot code programmedinto the ASIC reads from the security location in the FLASH memorybefore polling the serial port for activity. If the value read matchesthe expected password, the boot code jumps directly to the start ofFLASH memory and prohibits downloading of a program into system memoryvia the serial port.

According to an aspect of the invention, there is provided a boot methodfor use in a mobile device having FLASH memory storing boot instructionsand having a serial port, comprising the steps of: reading contents of asecurity location in the FLASH memory; comparing the contents of thesecurity location to a predetermined security value; and selectivelypolling the serial port for activity based on the result of thecomparison.

In a presently preferred embodiment, the polling is performed if thecontents of the security location do not match the predeterminedsecurity value. The method can further include the step of jumping to aboot location in FLASH memory to execute instructions stored therein. Insuch a case, the method can further include the step of downloading codeinto internal SRAM located in the mobile device in response to adetection of serial port activity, as well as the steps of executing aninstruction in the downloaded code, and jumping to a boot location inFLASH memory to execute boot instructions stored therein.

In a boot method according to an embodiment of the invention, thepredetermined security value can be stored in a BootROM located in themobile device. Also, in the boot method, the step of reading ispreferably performed in response to a reset command.

According to another aspect of the invention, there is provided anapparatus for use in a mobile device having a serial port, comprising: afirst memory means having a predetermined security value stored therein;a second memory means having a security location; and a processor incommunication with the first and second memory means for comparing thecontents of the security location to said predetermined security value,and for selectively polling the serial port for activity based on theresult of the comparison.

In a presently preferred embodiment, the first memory means is a BootRead Only Memory (BootROM), and the second memory means is a FLASHmemory. The apparatus can further include a reset means in communicationwith the processor for initiating a reset process. Preferably, theprocessor compares contents of the security location and thepredetermined security value in response to initiation of a resetprocess.

In terms of specific implementations of the apparatus, the first memorymeans can be located on an ASIC, as can be the processor. The processorcan include a microcontrol unit connected to the serial port, and canalso include a digital signal processor connected to the second memorymeans.

Other aspects and features of the present invention will become apparentto those ordinarily skilled in the art upon review of the followingdescription of specific embodiments of the invention in conjunction withthe accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention will now be described, by way ofexample only, with reference to the attached figures, wherein:

FIG. 1 is a block diagram of a typical ASIC and associated externalcomponents operating therewith;

FIG. 2 is a block diagram of an ASIC and associated external componentsoperating therewith according to an embodiment of the present invention,incorporating a security feature;

FIG. 3 is a flow diagram of a boot method used by a typical ASIC;

FIG. 4 is a flow diagram of a boot method used by an ASIC according toan embodiment of the present invention, having a security feature.

DETAILED DESCRIPTION

Generally, the present invention provides a method and apparatus for usein a mobile device. A security feature is provided that reduces thelikelihood of a security breach, preferably in a situation where a resetof the mobile device has been initiated. A predetermined security value,or password, is stored, for example in BootROM. Program code in theBootROM is preferably modified so that a security location within FLASHmemory is read prior to polling the serial port for activity. Polling ofthe serial port is then selectively performed, depending on the resultof a comparison between the stored password and the contents of thesecurity location, or key. In a presently preferred embodiment, if thevalue in the security location matches the predetermined security value,then polling of the serial port is not performed.

FIG. 1 is a block diagram of a typical ASIC and associated externalcomponents operating therewith. ASIC 2 comprises a digital signalprocessor (DSP) 4 and a microcontrol unit (MCU) 6. It is well known inthe art that the DSP 4 and the MCU 6 are essentially two processorsexisting in the same integrated circuit and sharing a plurality ofresources.

A reset circuit 8 communicates to the MCU 6 and the DSP 4. An externalreset switch 10 controls the reset circuit 8. When the reset switch 10is actuated, the reset circuit 8 closes, sending a signal, or resetcommand, to the MCU 6 and the DSP 4 to reset. When the reset switch 10is released and the reset circuit 8 opens, the MCU 6 executesinstructions stored in internal BootROM 14. The reset circuit 8 and thereset switch 10 may be referred to together as comprising a reset means.

The MCU 6 also communicates with a serial port 12. The serial port 12can be connected to a personal computer (PC) 11, enabling the PC tocommunicate with the ASIC 2. Although the invention is described hereinas communicating with a PC, the invention is not limited to such anarrangement; any arrangement whereby the required information can bedelivered to the processor, i.e. MCU, via the serial port can be used.When the MCU 6 executes instructions stored in the internal BootROM 14in response to a reset command, the BootROM 14 instructs the MCU 6 topoll the serial port 12 for activity.

The BootROM 14 is also located on the ASIC 2. The BootROM 14 interfacesunidirectionally with the MCU 6. The DSP 4 and MCU 6 both interface withan external memory interface 16 in order to access an external SRAM 17and FLASH memory 18. The DSP 4 and MCU 6 also both directly access aninternal SRAM 13, or other internal system memory.

FIG. 2 shows the same ASIC and associated external components as in FIG.1, but incorporating a security feature according to an embodiment ofthe present invention.

A security feature is provided according to an embodiment of theinvention that reduces the likelihood of a security breach, preferablyin a situation where a reset of the mobile device has been initiated. Apredetermined security value, or password, is stored, for example in theBootROM 14. Program code in the BootROM is preferably modified so that asecurity location within the mobile device's FLASH memory is read priorto polling the serial port for activity.

Polling of the serial port is then selectively performed, depending onthe result of a comparison between the predetermined security value, orstored password, and the contents of the security location. In apresently preferred embodiment, if the value in the security locationmatches the predetermined security value, then polling of the serialport is not performed, thereby avoiding the potential security risksassociated with such polling.

In an exemplary embodiment, additional code (key reading code) 15 ispreferably added to program code stored in the BootROM 14, which isexecuted therefrom, preferably immediately after a reset. The additionalcode 15 is used to preferably read a value from a security location 19,or key location, in the FLASH memory 18. The key location 19 is anexample of a security location in the FLASH memory 18 in which anexpected password can be stored. The term “key” can be used to representthe value stored in the security location, which will be compared to thepredetermined security value stored in the BootROM. The security featurecan be considered to be a selective polling of the serial port,depending on the result of a comparison of the key 19 and the expectedpassword. Polling of the serial port is preferably not performed whenthe FLASH memory 18 has been programmed with the key 19 having a valuethat matches the predetermined security value, or password, stored inthe BootROM 14, and a comparison is made to verify that match.

FIG. 3 is a flow diagram depicting a boot method used by a typical ASIC2 when a reset is initiated. After initiation of a reset in step 20,program code stored in BootROM 14 initiates polling of the serial port12 for activity in step 22. If the serial port is connected to a PC 11,then the PC 11 can communicate with the ASIC 2. A determination is madein step 24 as to whether there is any activity on the serial port 12. Ifthere is serial port activity, the program code in BootROM 14 will jumpto a routine for downloading code and download such program code, asillustrated in step 26, into internal SRAM 13 via the serial port. Oncedownloading is complete, the program code in BootROM 14 will jump to thebeginning of the downloaded code and begin to execute the downloadedcode. A potential security risk in such a configuration is that adownloaded program could upload, or extract, contents of the FLASHmemory 18 including confidential and/or proprietary information.

If, in step 24, it is found that there is no serial port activity, theprogram code in BootROM 14 waits for a timeout period to elapse, asillustrated in step 28. A current timeout value is determined, forexample, by decrementing a count value in a register inside the MCU 6.When the timeout period elapses, the program code in BootROM 14 jumpsdirectly to a boot location in the FLASH memory 18 in step 30 to executeprogram code starting at the boot location. If the timeout period hasnot elapsed, then the method returns to step 22 and waits for serialport activity or for the timeout period to elapse. A suitable timeoutperiod can be, for example, 40 msec.

FIG. 4 shows a flow diagram depicting a boot method according to anembodiment of the present invention providing a security feature as anenhancement over the method in FIG. 3. An ASIC 2 preferably employs thismethod when a reset is initiated. The BootROM code 14 is preferablymodified so that a predefined location, or security location, in FLASHmemory 18 is read prior to polling the serial port 12 for activity.

Referring to FIG. 4, after a reset is initiated in step 32, the BootROMcode 14 preferably reads the contents of the security location in FLASHmemory, or the key, 19, in step 34. A determination is then made in step36 as to whether the key, or the contents of the security location inFLASH memory, matches the password, or predetermined security value,stored in the BootROM. If it is determined that such a match exists,then in step 38, the BootROM code is preferably programmed to jump tothe FLASH 18 for execution of instructions in a boot location thereof.Jumping to the boot location in FLASH memory 18 prevents the downloadingof a program via the serial port 12 into internal SRAM 13.

If it is determined in step 36 that the key value does not match thestored password, then the BootROM code 14 polls the serial port 12 foractivity in step 40. In step 42, it is determined whether there is anyactivity on the serial port 12. If in step 42, it is determined thatthere is activity on the serial port 12, then the method proceeds tostep 44. Such a positive determination can be made, for example, when aPC is connected to the serial port. In step 44, the BootROM code 14jumps to a routine for downloading code into the internal SRAM 13 viathe serial port 12. Once this download occurs, the BootROM code 14 jumpsto the beginning of the downloaded code.

If, in step 42, it is found that there is no serial port activity, theprogram code in BootROM 14 waits for a timeout period to elapse, asillustrated in step 46. A current timeout value is determined, forexample, by decrementing a count value in a register inside the MCU 6.When the timeout period elapses, the program code in BootROM 14 jumpsdirectly to a boot location in the FLASH memory 18 in step 38 and theprogram code execution continues. If the timeout has not elapsed, thenthe method returns to step 40 and waits for serial port activity or forthe timeout period to elapse.

Although the option of polling the serial port for activity still existsin the flowchart in FIG. 4, this path will be followed only in theabsence of a security value that matches the stored password.Programming of a predetermined security value and a matching value in asecurity location in FLASH memory is preferably performed duringdevelopment or production of the mobile device, prior to its commercialsale. It is possible that a malicious individual could try to modify thecode following its commercial sale so that the key is not recognised asmatching the password, in which case polling of the serial port wouldoccur. However, such a security breach would be difficult to attemptoutside of the development phase, once the key reading code 15 has beenadded to the BootROM code 14. Furthermore, attempting a breach to takeadvantage of this potential security risk would involve invasivemeasures not generally known to a layperson.

Although expressions such as security location and memory location areused herein in the singular, this is simply for convenience and oneskilled in the art will appreciate that any number of memory locationsmay be used in order to store a predetermined security value or values.The number of memory locations required can depend on the complexity ofthe security value and its length, which may affect the selection of thepredetermined security value. In terms of physical implementation, suchmemory locations may be either contiguous or non-contiguous locationslinked to one another in some manner known to those skilled in the art,so as to represent, together, a security location, for example.

In an alternative embodiment, selective polling of the serial port isperformed in the case where the value in the security location doesmatch the predetermined security value. Any other suitable comparisonscheme or equivalent security feature may be alternatively used in orderto regulate the selective polling of the serial port in a mobile device.

The above-described embodiments of the present invention are intended tobe examples only. Alterations, modifications and variations may beeffected to the particular embodiments by those of skill in the artwithout departing from the scope of the invention, which is definedsolely by the claims appended hereto.

What is claimed is:
 1. A boot method for use in a mobile device havingflash memory storing boot instructions and having a serial port, themethod comprising the steps of: reading contents of a security locationin the flash memory; comparing the contents of the security location toa predetermined security value; on a first result of comparing thecontents of the security location to the predetermined security value,polling the serial port for activity based on the result of thecomparison; and on a second result of comparing the contents of thesecurity location to the predetermined security value, jumping to a bootlocation in the flash memory to execute instructions stored therein. 2.A boot method according to claim 1 wherein the first result comprisesthe contents of the security location not matching the predeterminedsecurity value.
 3. A boot method according to claim 2 wherein the secondresult comprises the contents of the security location matching thepredetermined security value.
 4. A boot method according to claim 1further comprising the step of downloading code into internal SRAMlocated in the mobile device in response to a detection of serial portactivity.
 5. A boot method according to claim 4 further comprising thestep of executing an instruction in the downloaded code.
 6. A bootmethod according to claim 1 wherein the predetermined security value isstored in a BootROM located in the mobile device.
 7. A boot methodaccording to claim 1 wherein the step of reading is performed inresponse to a reset command.
 8. An apparatus for use in a mobile devicehaving a serial port, the apparatus comprising: a first memory devicehaving a predetermined security value stored therein; a second memorydevice having a security location; and a processor in communication withthe first memory device and second memory device, the processor beingconfigured to: compare the contents of the security location to thepredetermined security value; on a first result of comparing thecontents of the security location to the predetermined security value,polling the serial port for activity based on the result of thecomparison; and on a second result of comparing the contents of thesecurity location to the predetermined security value, in to a bootlocation in the flash memory to execute instructions stored therein. 9.An apparatus according to claim 8 wherein the first memory devicecomprises a Boot Read Only Memory (BootROM).
 10. An apparatus accordingto claim 8 wherein the second memory device comprises a flash memory.11. An apparatus according to claim 8 further comprising a reset circuitin communication with the processor for initiating a reset process. 12.An apparatus according to claim 8 wherein the processor comparescontents of the security location and said predetermined security valuein response to initiation of a reset process.
 13. An apparatus accordingto claim 8 wherein the first memory device is located on an ASIC.
 14. Anapparatus according to claim 8 wherein the processor is located on anASIC.
 15. An apparatus according to claim 8 wherein the processorcomprises a microcontrol unit connected to the serial port.
 16. Anapparatus according to claim 8 wherein the processor comprises a digitalsignal processor connected to the second memory device.